﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    EnableEventValidation="false" CodeFile="callme-newlead-quotes.aspx.cs" Inherits="carinsurance_offline_callme_newlead_quotes" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="Server">
    <title>
        <%=GetGlobalResourceObject("General", "CallMeBackQuotes")%>
        - GG-CRM - กล้วยๆ.com - Teledirect Thailand</title>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitle" runat="Server">
    <table width="100%" cellpadding="5">
        <tr>
            <td style="width: 800px">
                <h1>
                    <asp:Label runat="server" Text="<%$Resources:General,CallMeBackQuotes%>" ID="lblPageName"></asp:Label>
                    <asp:Label runat="server" Text="" ID="lblCallTypeDesc"></asp:Label></h1>
            </td>
            <td style="width: 200px; text-align: right;">
                <asp:Button runat="server" ID="btnBack" Text="BACK" Visible="true" OnClick="btnBack_Click"
                    Width="121px" Height="30px" Font-Bold="true" ValidationGroup="none" CausesValidation="false"
                    OnClientClick="return BackConfirm();" CssClass="blueB ml10" />&nbsp;
            </td>
            <td style="text-align: right">
                <asp:Button runat="server" ID="btnReset" Text="Reset/Reload" Visible="true" OnClick="btnReset_Click"
                    Width="121px" Height="30px" Font-Bold="true" ValidationGroup="none" CausesValidation="false"
                    OnClientClick="return ResetConfirm();" CssClass="blueB ml10" />
                <asp:Label runat="server" Text="0" ID="lblResetUrl" Visible="false" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="display: none;"><asp:Label runat="server" Text="<%$Resources:General,LangOption%>"
        ID="lblLangOption" /></div> 
    <asp:Label runat="server" Visible="false" ID="lblRenewalStatus" Text="0" /><asp:HiddenField ID="hidPromotionId" runat="server" /><asp:HiddenField ID="hidProComMonth" runat="server" />
    <div class="bc2">
        <asp:Label runat="server" ID="lblSiteLocation" Text="You are here : " CssClass="bclist" />
        <asp:SiteMapPath SiteMapProvider="SiteUserSiteMapProvider" ID="smpProvider" runat="server"
            PathSeparator=" : ">
            <PathSeparatorStyle CssClass="bcarrow" />
            <CurrentNodeStyle CssClass="bclist" />
            <NodeStyle CssClass="bclink" />
            <RootNodeStyle CssClass="bclink" />
        </asp:SiteMapPath>
        <div class="clear">
        </div>
    </div>
    <div style="display: none;">
        <img src="../../images/icons/dark/call.png" alt="" class="titleIcon" /><h6>
            <asp:Label ID="lblStartDayNameCaption" Font-Bold="true" runat="server" Text="<%$Resources:General,Started%>" />
            at
            <asp:Label runat="server" ID="lblStartDayName" Font-Bold="true" />
            &nbsp;<asp:Label runat="server" ID="lblStartDateTime" Visible="true" ForeColor="Red"
                Font-Bold="true" />
            <asp:Label ID="lblCallDurationCaption" Font-Bold="true" runat="server" Text="<%$Resources:General,CallDuration%>" />
            <span style="display: none;">M:<asp:TextBox runat="server" ID="txtMinute" Text="00"
                Width="30px" />
                S:<asp:TextBox runat="server" ID="txtSecond" Text="00" Width="30px" /></span>
            <asp:Label runat="server" ID="lblCallDurationTimer" Font-Bold="true" Font-Size="Large" />
        </h6>
    </div>
    <table width="100%">
        <tr>
            <td>
                <asp:Label runat="server" Text="" ID="lblCallSessionName" Font-Bold="true"></asp:Label>
                <asp:Label ID="lblTESCO200" runat="server" Font-Bold="true" ForeColor="Green" Font-Size="Large" />
                <asp:Literal ID="ltrPromotion" runat="server" />
            </td>
        </tr>
    </table>
    <a id="quotenav" />
    <div class="toggle">
        <div class="title opened" id="opened1">
            <img src="../../images/icons/dark/imagesList.png" alt="" class="titleIcon" />
            <h6>
                <asp:Label ID="lblCaption" runat="server" Text="<%$Resources:General,Quotation%>" />
            </h6>
        </div>
        <%--</div>--%>
        <asp:Panel ID="pnlQuotes" runat="server" Visible="true">
            <div class="widgets">
                <div class="form">
                    <fieldset class="step">
                        <asp:UpdatePanel ID="upnlDetails" UpdateMode="Conditional" runat="server">
                            <ContentTemplate>
                                <div>
                                    <asp:ValidationSummary HeaderText="Opps..,please complete all(*) fields." runat="server"
                                        ValidationGroup="newleads" ID="vsNewLeads" ShowMessageBox="false" ShowSummary="true"
                                        Font-Bold="true" />
                                    <asp:Label runat="server" ID="lblLoadMessage" Font-Bold="true" ForeColor="Red" Text="" />
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="form">
                                    <div id="divOne" class="oneTwo">
                                        <div class="toggle">
                                            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="sTable">
                                                <tr>
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label6" Text="<%$Resources:General,InsuranceType%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlInsuranceType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlInsuranceType_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvInsuranceType" ControlToValidate="ddlInsuranceType"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr runat="server" id="rowGarageType">
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label1" Text="<%$Resources:Proposal,GarageType%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlGarageType" runat="server" >
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvGarageType" ControlToValidate="ddlGarageType"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label17" Text="<%$Resources:CarInsurance,FirstName%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtFirstName" runat="server" MaxLength="50" Width="250px" />
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvFirstName" ControlToValidate="txtFirstName"
                                                            ErrorMessage="" Text="*" ValidationGroup="newleads"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revFirstName" runat="server" ControlToValidate="txtFirstName"
                                                            ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$" ValidationGroup="newleads"
                                                            ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label18" Text="<%$Resources:CarInsurance,LastName%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtLastName" runat="server" MaxLength="50" Width="250px" />
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvLastName" ControlToValidate="txtLastName"
                                                            ErrorMessage="" Text="*" ValidationGroup="newleads"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revLastName" runat="server" ControlToValidate="txtLastName"
                                                            ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$" ValidationGroup="newleads"
                                                            ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                                        <asp:Label runat="server" ID="lblOrgCarMakeModel" Text="" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label19" Text="<%$Resources:CarInsurance,EmailAddress%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtEmailAddress" runat="server" MaxLength="75" Width="250px" ReadOnly="false" />
                                                        <asp:RequiredFieldValidator ID="rfvEmailAddress" runat="server" Text="*" ValidationGroup="newleads"
                                                            ErrorMessage="" ControlToValidate="txtEmailAddress" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revEmailAddress" Text="<%$Resources:General,Notvalid%>"
                                                            runat="server" ValidationGroup="newleads" ErrorMessage="" ControlToValidate="txtEmailAddress"
                                                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label20" Text="<%$Resources:CarInsurance,MobileNo%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtMobileNo" runat="server" MaxLength="30" Width="150px" />
                                                        <asp:RequiredFieldValidator ID="rfvMobileNo" ControlToValidate="txtMobileNo" ErrorMessage=""
                                                            ValidationGroup="newleads" runat="server" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revMobileNo" runat="server" ErrorMessage="" ValidationGroup="newleads"
                                                            ValidationExpression="[0-9]{10}" ControlToValidate="txtMobileNo" Text="<%$Resources:General,Notvalid%>"
                                                            Display="Dynamic"></asp:RegularExpressionValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label21" Text="<%$Resources:Proposal,Gender%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlGender" runat="server">
                                                            <asp:ListItem Selected="True" Value="-1" Text="<%$ Resources:General,Select%>"></asp:ListItem>
                                                            <asp:ListItem Value="M" Text="<%$ Resources:Proposal,Male%>"></asp:ListItem>
                                                            <asp:ListItem Value="F" Text="<%$ Resources:Proposal,Female%>"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvGender" ControlToValidate="ddlGender"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label22" Text="<%$Resources:Proposal,DOB%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlDOBDay" runat="server">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDOBDay" ControlToValidate="ddlDOBDay"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:DropDownList ID="ddlDOBMonth" runat="server">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDOBMonth" ControlToValidate="ddlDOBMonth"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:DropDownList ID="ddlDOBYear" runat="server">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDOBYear" ControlToValidate="ddlDOBYear"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="25">
                                                        <asp:Label runat="server" ID="Label23" Text="<%$Resources:Proposal,Occupation%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlOccupation" runat="server" Width="250px">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvOccupation" ControlToValidate="ddlOccupation"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="3">
                                                        <asp:Button ID="btnNonGGQuotation" runat="server" Width="180px" OnClick="btnNonGGQuotation_Click"
                                                            ValidationGroup="newleads" CssClass="blueB ml10" Text="Go To Manual Quote" OnClientClick="return GoNonGGQuotation();" />
                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        <asp:Button ID="btnSubmit" runat="server" Width="100px" OnClick="btnSubmit_Click"
                                                            ValidationGroup="newleads" CssClass="blueB ml10" Text="<%$Resources:General,Submit%>"
                                                            OnClientClick="return SubmitLeadConfirm();" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td height="30" colspan="3">
                                                        <asp:Label runat="server" ID="lblMessage" Text="" Font-Bold="true" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                    <div id="divTwo" class="oneTwo">
                                        <div class="toggle">
                                            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="sTable">
                                                <tr runat="server" id="divLastYearRefNo" visible="false">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label30" Text="Last Year Quote Ref.No" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:Label runat="server" ID="lblLastYearCarID" Visible="true" />
                                                        <asp:Label runat="server" ID="lblLastYearRefNo" Font-Bold="true" Font-Size="Large"
                                                            Text="N/A" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label2" Text="<%$Resources:Proposal,CarYear%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlCarYear" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCarYear_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvCarYear" ControlToValidate="ddlCarYear"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label3" Text="<%$Resources:CarInsurance,CarMake%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList runat="server" ID="ddlCarMake" Width="280px" AutoPostBack="true"
                                                            OnSelectedIndexChanged="ddlCarMake_SelectedIndexChanged">
                                                            <asp:ListItem Value="-1" Text="<%$ Resources:General,Select%>"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvCarMake" ControlToValidate="ddlCarMake"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="3">
                                                        <asp:Label runat="server" ID="Label27" Text="<%$Resources:Proposal,CarModel%>" />
                                                        <asp:DropDownList runat="server" ID="ddlModelBodyCCDoor">
                                                            <asp:ListItem Value="-1" Text="<%$ Resources:General,Select%>"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvModelBodyCCDoor" ControlToValidate="ddlModelBodyCCDoor"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <div runat="server" id="divOtherCar" style="padding: 5px 5px 5px 5px; display:none" >
                                                            <asp:Label runat="server" ID="Label31" Text="<%$Resources:CarInsurance,CarMake%>" Width="70px" />:<asp:TextBox runat="server" ID="txtOtherCarMake" Width="150px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvOtherCarMake" ControlToValidate="txtOtherCarMake"
                                                            ErrorMessage="" Text="*" ValidationGroup="newleads" Enabled="false"></asp:RequiredFieldValidator>
                                                            <br /><br /><asp:Label runat="server" ID="Label32" Text="<%$Resources:Proposal,CarModel%>" Width="70px" />:<asp:TextBox runat="server" ID="txtOtherCarModel" Width="150px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvOtherCarModel" ControlToValidate="txtOtherCarModel"
                                                            ErrorMessage="" Text="*" ValidationGroup="newleads" Enabled="false"></asp:RequiredFieldValidator>
                                                            <br /><br /><asp:Label runat="server" ID="Label33" Text="Body" Width="70px" />:<asp:DropDownList runat="server" ID="ddlOtherCarBody"></asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvOtherCarBody" ControlToValidate="ddlOtherCarBody"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Enabled="false"></asp:RequiredFieldValidator>
                                                            <br /><br /><asp:Label runat="server" ID="Label34" Text="cc" Width="70px" />:<asp:TextBox runat="server" ID="txtCcCar" Width="150px"></asp:TextBox>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvCcCar" ControlToValidate="txtCcCar"
                                                            ErrorMessage="" Text="*" ValidationGroup="newleads" Enabled="false"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revCcCar" runat="server" ControlToValidate="txtCcCar"
                                                            Display="Dynamic" ValidationGroup="newleads" ErrorMessage="ต้องเป็นจำนวนเต็ม"
                                                            ValidationExpression="^[1-9]\d*$" Enabled="false"></asp:RegularExpressionValidator>
                                                        <br /><br /><asp:Label runat="server" ID="Label35" Text="Door" Width="70px" />:<asp:DropDownList runat="server" ID="ddlOtherCarDoor" Width="50px">
                                                        <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                                        <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                                        <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label14" Text="<%$Resources:CarInsurance,CoverCommencementDate%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlCoverageComDate" onchange="GetCoverageEndDate()" runat="server">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvCoverageComDate" ControlToValidate="ddlCoverageComDate"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:Label runat="server" Visible="false" ID="lblCoverageExpireDateTitle" Text="<%$Resources:CarInsurance,CoverExpiryDate %>" />
                                                        <asp:Label runat="server" Visible="false" ID="lblCoverageExpireDate" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label15" Text="<%$Resources:Proposal,CurrentInsurer%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlCurrentInsurer" runat="server" Width="280px">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvCurrentInsurer" ControlToValidate="ddlCurrentInsurer"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr id="trNamedDriver" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label11" Text="<%$Resources:Proposal,NamedDrivers%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlNamedDrivers" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlNamedDrivers_SelectedIndexChanged">
                                                            <asp:ListItem Value="0" Text="<%$ Resources:Proposal,No%>"></asp:ListItem>
                                                            <asp:ListItem Value="1" Text="1"></asp:ListItem>
                                                            <asp:ListItem Value="2" Text="2"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr id="trDriverFirstDOB" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label12" Text="<%$Resources:Proposal,DriverFirstDOB%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlDriver1DOBDay" runat="server" Enabled="false">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDriver1DOBDay" ControlToValidate="ddlDriver1DOBDay"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:DropDownList ID="ddlDriver1DOBMonth" runat="server" Enabled="false">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDriver1DOBMonth" ControlToValidate="ddlDriver1DOBMonth"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:DropDownList ID="ddlDriver1DOBYear" runat="server" Enabled="false">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDriver1DOBYear" ControlToValidate="ddlDriver1DOBYear"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr id="trDriverTwoDOB" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label13" Text="<%$Resources:Proposal,DriverTwoDOB%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlDriver2DOBDay" runat="server" Enabled="false">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDriver2DOBDay" ControlToValidate="ddlDriver2DOBDay"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:DropDownList ID="ddlDriver2DOBMonth" runat="server" Enabled="false">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDriver2DOBMonth" ControlToValidate="ddlDriver2DOBMonth"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:DropDownList ID="ddlDriver2DOBYear" runat="server" Enabled="false">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvDriver2DOBYear" ControlToValidate="ddlDriver2DOBYear"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr id="trIsCTPL" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label24" Text="<%$Resources:NonGG,IsCTPL%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlCTPL" runat="server">
                                                            <asp:ListItem Value="-1" Text="<%$ Resources:General,Select%>"></asp:ListItem>
                                                            <asp:ListItem Value="1" Text="<%$ Resources:Proposal,Yes%>"></asp:ListItem>
                                                            <asp:ListItem Value="0" Text="<%$ Resources:Proposal,No%>"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvCTPL" ControlToValidate="ddlCTPL"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr id="trModification" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label4" Text="<%$Resources:Proposal,AccessaryAndModification%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlModification" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlModification_SelectedIndexChanged">
                                                            <asp:ListItem Value="-1" Text="<%$ Resources:General,Select%>"></asp:ListItem>
                                                            <asp:ListItem Value="1" Text="<%$ Resources:Proposal,Yes%>"></asp:ListItem>
                                                            <asp:ListItem Value="0" Text="<%$ Resources:Proposal,No%>"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvModification" ControlToValidate="ddlModification"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr id="trModificationAmount" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label16" Text="<%$Resources:Proposal,AccessaryAndModificationAmount%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtAccModAmount" runat="server" MaxLength="7" Width="100px" />
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvAccModAmount" ControlToValidate="txtAccModAmount"
                                                            ErrorMessage="" Text="*" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="revAccModAmount" runat="server" ControlToValidate="txtAccModAmount"
                                                            Display="Dynamic" ValidationGroup="newleads" ErrorMessage="<%$Resources:General,Notvalid%>"
                                                            ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                                    </td>
                                                </tr>
                                                <tr id="trDEC" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label7" Text="<%$Resources:Proposal,DEC%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlDeduct" runat="server">
                                                            <asp:ListItem Text="<%$ Resources:Proposal,Option_DeductNo%>" Value="0" />
                                                            <asp:ListItem Text="<%$ Resources:Proposal,Option_DeductYes%>" Value="5000" />
                                                            <asp:ListItem Text="<%$ Resources:Proposal,Option_DeductAll%>" Value="-1" />
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr id="trProvinceRegistration" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label8" Text="<%$Resources:Proposal,RegistrationProvince%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlProvinceRegistration" Width="145px" runat="server">
                                                            <asp:ListItem Text="<%$ Resources:General,Select%>" Value="-1" />
                                                            <asp:ListItem Text="<%$ Resources:Proposal,Province_BKK%>" Value="BKK" />
                                                            <asp:ListItem Text="<%$ Resources:Proposal,Province_UPC%>" Value="UPC" />
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvProvinceRegistration" ControlToValidate="ddlProvinceRegistration"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr id="trIsClaim" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label10" Text="<%$Resources:Proposal,IsClaim%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlAnyClaim" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlAnyClaim_SelectedIndexChanged">
                                                            <asp:ListItem Value="-1" Text="<%$ Resources:General,Select%>"></asp:ListItem>
                                                            <asp:ListItem Value="1" Text="<%$ Resources:Proposal,Yes%>"></asp:ListItem>
                                                            <asp:ListItem Value="0" Text="<%$ Resources:Proposal,No%>"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvAnyClaim" ControlToValidate="ddlAnyClaim"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr id="trNCB" runat="server">
                                                    <td width="200" height="25">
                                                        <asp:Label runat="server" ID="Label9" Text="<%$Resources:Proposal,NCB%>" />
                                                    </td>
                                                    <td>
                                                        :
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlNCB" runat="server">
                                                            <asp:ListItem Text="<%$ Resources:General,Select%>" Value="-1" />
                                                            <asp:ListItem Text="0 %" Value="0"></asp:ListItem>
                                                            <asp:ListItem Text="20 %" Value="20"></asp:ListItem>
                                                            <asp:ListItem Text="30 %" Value="30"></asp:ListItem>
                                                            <asp:ListItem Text="40 %" Value="40"></asp:ListItem>
                                                            <asp:ListItem Text="50 %" Value="50"></asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvNCB" ControlToValidate="ddlNCB"
                                                            ErrorMessage="" Text="*" InitialValue="-1" ValidationGroup="newleads" Display="Dynamic"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div style="display: none;">
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCallMeId"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCallTypeId"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtAgentLeadId"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCallMeEmail"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCallMeFullName"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCallMeMobileNo"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtDriverId1" Text="0"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtDriverId2" Text="0"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCarId"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCECarPolicyId"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCustomerId"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtCXCRMId"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtAgentId"></asp:TextBox>
                                    <asp:TextBox runat="server" ReadOnly="true" ID="txtNewQuote"></asp:TextBox>
                                    <asp:Label ID="lblRedirectCarId" runat="server"></asp:Label>
                                    <asp:Label ID="lblRedirectAgentLeadId" runat="server"></asp:Label>
                                    <asp:Label ID="lblRedirectCustomerId" runat="server"></asp:Label>
                                    <asp:Label ID="lblRedirectCallTypeId" runat="server"></asp:Label>
                                </div>
                                <div id="divHiddenMonths" style="display: none;">
                                    <input runat="server" id="lblJan" type="hidden" value="<%$ Resources:MonthResource, January%>" />
                                    <input runat="server" id="lblFeb" type="hidden" value="<%$ Resources:MonthResource, February%>" />
                                    <input runat="server" id="lblMar" type="hidden" value="<%$ Resources:MonthResource, March%>" />
                                    <input runat="server" id="lblApr" type="hidden" value="<%$ Resources:MonthResource, April%>" />
                                    <input runat="server" id="lblMay" type="hidden" value="<%$ Resources:MonthResource, May%>" />
                                    <input runat="server" id="lblJun" type="hidden" value="<%$ Resources:MonthResource, June%>" />
                                    <input runat="server" id="lblJul" type="hidden" value="<%$ Resources:MonthResource, July%>" />
                                    <input runat="server" id="lblAug" type="hidden" value="<%$ Resources:MonthResource, August%>" />
                                    <input runat="server" id="lblSep" type="hidden" value="<%$ Resources:MonthResource, September%>" />
                                    <input runat="server" id="lblOct" type="hidden" value="<%$ Resources:MonthResource, October%>" />
                                    <input runat="server" id="lblNov" type="hidden" value="<%$ Resources:MonthResource, November%>" />
                                    <input runat="server" id="lblDec" type="hidden" value="<%$ Resources:MonthResource, December%>" />
                                    <input runat="server" id="lblCultureInfo" type="hidden" />
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </fieldset>
                </div>
            </div>
        </asp:Panel>
    </div>
    <a id="callstatusnav" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <div id="divCallStatus" class="toggle" runat="server">
                <div class="title opened" id="opened5">
                    <img src="../../images/icons/dark/1st.png" alt="" class="titleIcon" />
                    <h6>
                        <asp:Label ID="lblLastCallStatusCaption" runat="server" Text="<%$Resources:General,LastCallStatus%>" />
                        <asp:Label ID="lblLastCallStatusMessage" runat="server" Text="" ForeColor="Red" />
                    </h6>
                </div>
                <div class="form">
                    <fieldset class="step">
                        <div class="formRow">
                            <asp:Label runat="server" ID="Label25" Text="<%$Resources:General,FinishCall%>" />
                            <div class="formRight">
                                <asp:RadioButton AutoPostBack="true" ID="rdoCallNotBuy" Text="<%$Resources:General,NotBuy%>"
                                    GroupName="calltype" runat="server" OnCheckedChanged="rdoCallFinish_CheckedChanged" />
                                <asp:RadioButton AutoPostBack="true" ID="rdoCallFinish" Text="<%$Resources:General,Buy%>"
                                    GroupName="calltype" runat="server" OnCheckedChanged="rdoCallFinish_CheckedChanged" />
                                <asp:RadioButton AutoPostBack="true" ID="rdoCallBack" Text="<%$Resources:General,Callback%>"
                                    GroupName="calltype" runat="server" OnCheckedChanged="rdoCallFinish_CheckedChanged" />
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="formRow">
                            <asp:Label runat="server" ID="lblStatusCaption" Text="<%$Resources:General,Status%>" />
                            <div class="formRight">
                                <asp:DropDownList ID="ddlCIMainCallStatus" runat="server" OnSelectedIndexChanged="ddlCIMainCallStatus_SelectedIndexChanged"
                                    AutoPostBack="true">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvCIMainCallStatus" Enabled="true" Display="Dynamic"
                                    ValidationGroup="callstatus" runat="server" ControlToValidate="ddlCIMainCallStatus"
                                    InitialValue="-1" Text="*" ErrorMessage="Select main call status type." />
                                <asp:DropDownList ID="ddlCICallStatus" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlCICallStatus_SelectedIndexChanged">
                                    <asp:ListItem Text="Select" Value="-1" />
                                    <asp:ListItem Text="Reject customer due to ineligibility/ claims /age/driving experience"
                                        Value="11" />
                                    <asp:ListItem Text="Do not agree to buy" Value="12" />
                                    <asp:ListItem Text="Customer renew with other insurer" Value="13" />
                                    <asp:ListItem Text="Just shopping" Value="14" />
                                    <asp:ListItem Text="GG quoted premium too high" Value="15" />
                                    <asp:ListItem Text="Policy not expiring so soon" Value="16" />
                                    <asp:ListItem Text="Others – Free Field to input" Value="17" />
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvCICallStatus" Enabled="true" Display="Dynamic"
                                    ValidationGroup="callstatus" runat="server" ControlToValidate="ddlCICallStatus"
                                    InitialValue="-1" ErrorMessage="Select call status type." Text="*" />
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="formRow" runat="server" id="trCallBack1" visible="false">
                            <asp:Label runat="server" ID="Label28" Text="<%$Resources:General,DateTime%>" />
                            <div class="formRight">
                                <asp:TextBox runat="server" ID="txtTargetDate" Width="100px" MaxLength="20"></asp:TextBox>
                                <asp:CalendarExtender ID="cexTargetDate" runat="server" TargetControlID="txtTargetDate"
                                    PopupButtonID="imgTargetDate" Animated="true" PopupPosition="TopLeft" DaysModeTitleFormat="dd-MMM-yyyy"
                                    Format="dd-MMM-yyyy">
                                </asp:CalendarExtender>
                                <asp:DropDownList ID="ddlTHour" runat="server">
                                    <asp:ListItem Text="hh" Value="-1" />
                                    <asp:ListItem Text="08" Value="08" />
                                    <asp:ListItem Text="09" Value="09" />
                                    <asp:ListItem Text="10" Value="10" />
                                    <asp:ListItem Text="11" Value="11" />
                                    <asp:ListItem Text="12" Value="12" />
                                    <asp:ListItem Text="13" Value="13" />
                                    <asp:ListItem Text="14" Value="14" />
                                    <asp:ListItem Text="15" Value="15" />
                                    <asp:ListItem Text="16" Value="16" />
                                    <asp:ListItem Text="17" Value="17" />
                                    <asp:ListItem Text="18" Value="18" />
                                    <asp:ListItem Text="19" Value="19" />
                                </asp:DropDownList>
                                :
                                <asp:DropDownList ID="ddlTMin" runat="server">
                                    <asp:ListItem Text="mm" Value="-1" />
                                    <asp:ListItem Text="00" Value="00" />
                                    <asp:ListItem Text="10" Value="10" />
                                    <asp:ListItem Text="20" Value="20" />
                                    <asp:ListItem Text="30" Value="30" />
                                    <asp:ListItem Text="40" Value="40" />
                                    <asp:ListItem Text="50" Value="50" />
                                </asp:DropDownList>
                                <asp:CustomValidator ID="csvTargetDate" runat="server" ValidationGroup="callstatus"
                                    ControlToValidate="txtTargetDate" ErrorMessage="Invalid callback date time." OnServerValidate="csvTargetDate_ServerValidate">*</asp:CustomValidator>
                                <asp:TextBox runat="server" Visible="false" ID="txtCallBackDateTime" />
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="formRow" id="trCallBack2" runat="server" visible="false">
                            <asp:Label runat="server" ID="Label29" Text="<%$Resources:General,ToWho%>" />
                            <div class="formRight">
                                <asp:DropDownList ID="ddlCBAgentList" runat="server">
                                    <asp:ListItem Text="Agent 1" Value="201" />
                                    <asp:ListItem Text="Agent 2" Value="202" />
                                    <asp:ListItem Text="Agent 3" Value="203" />
                                    <asp:ListItem Text="Agent 4" Value="204" />
                                    <asp:ListItem Text="Agent 5" Value="205" />
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvCBAgentList" Enabled="true" Display="Dynamic"
                                    ValidationGroup="callstatus" runat="server" ControlToValidate="ddlCBAgentList"
                                    ErrorMessage="Select call back agent." Text="*" />
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <asp:Panel runat="server" ID="pnlCallMeStatus" Visible="false">
                            <div class="formRow">
                                <label>
                                    Call Me Comments</label>
                                <div class="formRight">
                                    <asp:TextBox runat="server" TextMode="MultiLine" Visible="false" Height="100px" ID="txtCICallMeRemark"
                                        ReadOnly="true" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </asp:Panel>
                        <div class="formRow">
                            <asp:Label runat="server" ID="lblCommentsCaption" Text="<%$Resources:General,Comments%>" />
                            <div class="formRight">
                                <asp:TextBox runat="server" TextMode="MultiLine" Height="100px" ID="txtCallStatus" />
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <asp:Label runat="server" ID="lblCallStatusMessage" Font-Bold="true" ForeColor="Red" />
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                            <ProgressTemplate>
                                <asp:Label runat="server" ID="lblProcessingMessage" Text="<%$Resources:General,ProcessingPlsWait%>" /></ProgressTemplate>
                        </asp:UpdateProgress>
                    </fieldset>
                    <div class="wizButtons">
                        <span class="wNavButtons">
                            <asp:Button runat="server" ValidationGroup="callstatus" ID="btnCallStatus" Text="<%$Resources:General,Save%>"
                                OnClick="btnCallStatus_Click" OnClientClick="return SubmitConfirm();" CssClass="blueB ml10" />
                            <asp:Button runat="server" CausesValidation="false" ID="btnNext" Text="<%$Resources:General,NewCall%>"
                                Visible="false" OnClick="btnNext_Click" CssClass="blueB ml10" OnClientClick="return NextConfirm();" />
                        </span>
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <asp:ValidationSummary runat="server" ValidationGroup="callstatus" ID="vsCallStatus"
                    ShowMessageBox="true" ShowSummary="false" />
                <div class="clear">
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="uplResults" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <div class="toggle" runat="server" id="divResult" visible="false">
                <div class="title opened" id="Div3">
                    <img src="../../images/icons/dark/cart.png" alt="" class="titleIcon" /><h6>
                        Online
                        <asp:Label ID="lblQuoteResultTitle" runat="server" Text="<%$Resources:CarInsurance,QuoteResults %>" /></h6>
                </div>
                <asp:GridView ID="gvCarResult" runat="server" AutoGenerateColumns="False" CellPadding="2"
                    Width="100%" GridLines="None" CssClass="sTable" DataKeyNames="CITempResultId,ProviderCompanyId,BuyUrl"
                    EmptyDataText="No Matches Found! <br/> Please go to Manual Quotation page. <br/>Please take note that there are no matches found based on customer's details entered."
                    EmptyDataRowStyle-CssClass="" OnRowCreated="gvCarResult_RowCreated"
                    AllowSorting="false" OnSelectedIndexChanged="gvCarResult_SelectedIndexChanged"
                    OnRowDataBound="gvCarResult_RowDataBound" OnRowCommand="gvCarResult_RowCommand">
                    <Columns>
                        <asp:BoundField DataField="CITempResultId" HeaderText="CITempResultId" Visible="false" />
                        <asp:BoundField DataField="CXCoverTypeId" HeaderText="CoverTypeId" Visible="false" />
                        <asp:BoundField DataField="ProviderCompanyId" HeaderText="ProviderCompanyId" Visible="false" />
                        <asp:TemplateField HeaderText="<%$Resources:CarInsuranceResultPage,Insurer %>" SortExpression="CompanyName">
                            <ItemTemplate>
                                <div>
                                    <asp:Image ID="imgCompanyLogo" runat="server" />
                                </div>
                                <div>
                                    <asp:Label ID="lblPackageName" runat="server" Text="" />
                                </div>
                                <div>
                                    <asp:HyperLink ID="hplWorkshopLink" runat="server" Text="<%$Resources:CarInsurance,GarageLink %>" />
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="CompanyName" Visible="false" HeaderText="Company Name"
                            SortExpression="CompanyName" />
                        <asp:BoundField DataField="TotalVMI" DataFormatString="{0:#,0.00}" HtmlEncode="false"
                            HeaderText="<%$Resources:CarInsuranceResultPage,TotalVMI %>" HeaderStyle-Width="90"
                            SortExpression="TotalVMI" Visible="false" />
                        <asp:BoundField DataField="AnnualPremium" Visible="false" />
                        <asp:TemplateField HeaderText="<%$Resources:CarInsuranceResultPage,TotalVMI %>" SortExpression="TotalVMI"
                            HeaderStyle-Width="110">
                            <ItemTemplate>
                                <div>
                                    <asp:Label ID="lblResultPromotionPrice" runat="server" Text="" Font-Bold="true" ForeColor="Blue" />
                                </div>
                                <div>
                                    <asp:Label ID="lblOriginalPrice" runat="server" Text="<%$Resources:CarInsuranceResultPage,OriginalPrice %>"
                                        Font-Bold="true"></asp:Label>
                                </div>
                                <div>
                                    <asp:Label ID="lblResultAnnualPremium" runat="server" Text=""></asp:Label>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="<%$Resources:CarInsuranceResultPage,CTPL %>" HeaderStyle-Width="60"
                            SortExpression="TotalCMI" Visible="false">
                            <ItemTemplate>
                                <div>
                                    <asp:Image ID="imgCTPL" ImageUrl="~/OLD/images/icons/X.gif" runat="server" />
                                </div>
                                <div>
                                    <asp:Label ID="lblCTPLSymbol" runat="server" Text="" />
                                    <asp:Label ID="lblCTPL" runat="server" Text="" />
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="green_item" HeaderStyle-CssClass="green_bottom"
                            HeaderStyle-Width="100" HeaderText="<%$Resources:CarInsuranceResultPage,DEC %>"
                            SortExpression="DEC">
                            <ItemTemplate>
                                <div>
                                    <asp:Label ID="lblDECZero" runat="server" Text="Waived" />
                                </div>
                                <div>
                                    <asp:Label ID="lblDECSymbol" runat="server" Text="" />
                                    <asp:Label ID="lblDEC" runat="server" Text="" />
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-CssClass="green_item" HeaderStyle-CssClass="green_bottom"
                            HeaderStyle-Width="100" HeaderText="<%$Resources:CarInsuranceResultPage,OwnDamageFireTheft %>"
                            SortExpression="SumInsured">
                            <ItemTemplate>
                                <div>
                                    <asp:Image ID="imgSumInsured" ImageUrl="~/OLD/images/icons/X.gif" runat="server" />
                                </div>
                                <div>
                                    <asp:Label ID="lblSumInsuredSymbol" runat="server" Text="" />
                                    <asp:Label ID="lblSumInsured" runat="server" Text="" />
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="TPPD" ItemStyle-CssClass="blue_item" HeaderStyle-CssClass="blue_bottom"
                            DataFormatString="{0:#,0}" HeaderStyle-Width="90" HtmlEncode="false" HeaderText="<%$Resources:CarInsuranceResultPage,TPPD %>"
                            SortExpression="TPPD" />
                        <asp:BoundField DataField="TPBIA" ItemStyle-CssClass="blue_item" HeaderStyle-CssClass="blue_bottom"
                            DataFormatString="{0:#,0}" HeaderStyle-Width="90" HtmlEncode="false" HeaderText="<%$Resources:CarInsuranceResultPage,TPBIA %>"
                            SortExpression="TPBIA" />
                        <asp:BoundField DataField="TPBIP" ItemStyle-CssClass="blue_item" HeaderStyle-CssClass="blue_bottom"
                            DataFormatString="{0:#,0}" HeaderStyle-Width="90" HtmlEncode="false" HeaderText="<%$Resources:CarInsuranceResultPage,TPBIP %>"
                            SortExpression="TPBIP" />
                        <asp:BoundField DataField="PADriver" ItemStyle-CssClass="gold_item" HeaderStyle-CssClass="gold_bottom"
                            DataFormatString="{0:#,0}" HeaderStyle-Width="90" HtmlEncode="false" HeaderText="<%$Resources:CarInsuranceResultPage,PADriver %>"
                            SortExpression="PADriver" />
                        <asp:BoundField DataField="MedicalExpense" ItemStyle-CssClass="gold_item" DataFormatString="{0:#,0}"
                            HeaderStyle-Width="80" HtmlEncode="false" HeaderStyle-CssClass="gold_bottom"
                            HeaderText="<%$Resources:CarInsuranceResultPage,MED %>" SortExpression="MedExp" />
                        <asp:BoundField DataField="BailBond" ItemStyle-CssClass="gold_item" HeaderStyle-CssClass="gold_bottom"
                            DataFormatString="{0:#,0}" HeaderStyle-Width="90" HtmlEncode="false" HeaderText="<%$Resources:CarInsuranceResultPage,BailBond %>"
                            SortExpression="BailBond" />
                        
                        <asp:TemplateField HeaderText="<%$Resources:CarInsurance,Select%>">
                            <ItemTemplate>
                                <asp:Button runat="server" ID="btnSelectItem" Text="<%$Resources:CarInsurance,Select%>"
                                    CommandName="MySelect" CommandArgument='<%#Eval("CITempResultId")%>' OnClientClick="javascript:return SubmitSelectConfirm();"
                                    CssClass="blueB ml10" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle />
                    <PagerStyle />
                    <SelectedRowStyle />
                    <HeaderStyle CssClass="gridheader" />
                    <EditRowStyle />
                    <AlternatingRowStyle CssClass="gridodd" />
                    <RowStyle CssClass="grideven" />
                </asp:GridView>
                <div class="clear">
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div style="display: none;">
        <asp:TextBox ID="txtSelectedResultId" runat="server" Text="0"></asp:TextBox>
        <asp:TextBox ID="txtSelectedProviderId" runat="server" Text="0"></asp:TextBox>
    </div>

    <script type="text/javascript">

        function SubmitLeadConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('newleads')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            //else {
            //    ShowDiv();
            //}
            return _retVal;
        }

        function SubmitConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('callstatus')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            //else {
            //    ShowDiv();
            //}
            return _retVal;
        }

        function NextConfirm() {
            var _retVal = false;

            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmNext")%>');

            return _retVal;
        }

        function GoNonGGQuotation() {
            var _retVal = false;

            _retVal = confirm('Are you sure to go Manual Quotation page?');

            return _retVal;
        }

        function ResetConfirm() {
            var _retVal = false;

            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmRESETMessage")%>');
            return _retVal;
        }

        function BackConfirm() {
            var _retVal = false;

            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmtoGoBack")%>');
            return _retVal;
        }

        function SubmitSelectConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmtoSelectthisItem")%>');
            return _retVal;
        }

        function GetCoverageEndDate() {
            var _commDate = document.getElementById('<%=ddlCoverageComDate.ClientID%>');
            var _expDate = document.getElementById('<%=lblCoverageExpireDate.ClientID%>');
            var now = new Date();
            var next = new Date();
            var month = new Array(12);

            month[0] = document.getElementById('<%=lblJan.ClientID%>').value;  //"January";
            month[1] = document.getElementById('<%=lblFeb.ClientID%>').value; //"February";
            month[2] = document.getElementById('<%=lblMar.ClientID%>').value; // "March";
            month[3] = document.getElementById('<%=lblApr.ClientID%>').value; // "April";
            month[4] = document.getElementById('<%=lblMay.ClientID%>').value; //"May";
            month[5] = document.getElementById('<%=lblJun.ClientID%>').value; // "June";
            month[6] = document.getElementById('<%=lblJul.ClientID%>').value; //"July";
            month[7] = document.getElementById('<%=lblAug.ClientID%>').value; //"August";
            month[8] = document.getElementById('<%=lblSep.ClientID%>').value; //"September";
            month[9] = document.getElementById('<%=lblOct.ClientID%>').value; //"October";
            month[10] = document.getElementById('<%=lblNov.ClientID%>').value; //"November";
            month[11] = document.getElementById('<%=lblDec.ClientID%>').value; //"December";

            var strCommDate = _commDate.value;
            if (strCommDate != "-1") {
                var strDay = strCommDate.substring(0, 2);
                var strMonth = strCommDate.substring(2, 4) - 1;
                var strYear = strCommDate.substring(4, 8);
                now.setFullYear(strYear, strMonth, strDay);
                next.setFullYear((parseInt(strYear) + 1).toString(), strMonth, (now.getDate()).toString());

                var strExpiryDate = next.getDate() + "/" + month[next.getMonth()] + "/" + next.getFullYear();

                if (document.getElementById('<%=lblLangOption.ClientID%>').value == '1') {
                    strExpiryDate = next.getDate() + "/" + month[next.getMonth()] + "/" + (next.getFullYear() + 543);
                }
                else {
                    strExpiryDate = next.getDate() + "/" + month[next.getMonth()] + "/" + next.getFullYear();
                }

            }
            else {
            }
        }


        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);
        var postBackElement;
        function InitializeRequest(sender, args) {
            if (prm.get_isInAsyncPostBack())
                args.set_cancel(true);
            postBackElement = args.get_postBackElement();
            OnOffUpdateProgress(true);
        }
        var dGarage = true;
        var dModification = true;
        var tAccModAmount = true;
        var dAnyClaim = true;
        var dNamedDrivers = true;
        function OnOffUpdateProgress(onOff) {
            //if ($get('<=ddlInsuranceType.ClientID>') != null) {
            //    $get('<=ddlInsuranceType.ClientID>').disabled = onOff;
            //}

            if ($get('<%=ddlGarageType.ClientID%>') != null) {
                dGarage = $get('<%=ddlGarageType.ClientID%>').disabled;
                $get('<%=ddlGarageType.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlCarYear.ClientID%>') != null) {
                $get('<%=ddlCarYear.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlCarMake.ClientID%>') != null) {
                $get('<%=ddlCarMake.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlModelBodyCCDoor.ClientID%>') != null) {
                $get('<%=ddlModelBodyCCDoor.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlModification.ClientID%>') != null) {
                dModification = $get('<%=ddlModification.ClientID%>').disabled;
                $get('<%=ddlModification.ClientID%>').disabled = onOff;
            }

            if ($get('<%=txtAccModAmount.ClientID%>') != null) {
                tAccModAmount = $get('<%=txtAccModAmount.ClientID%>').disabled;
                $get('<%=txtAccModAmount.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlAnyClaim.ClientID%>') != null) {
                dAnyClaim = $get('<%=ddlAnyClaim.ClientID%>').disabled;
                $get('<%=ddlAnyClaim.ClientID%>').disabled = onOff;
            }
            if ($get('<%=ddlNamedDrivers.ClientID%>') != null) {
                dNamedDrivers = $get('<%=ddlNamedDrivers.ClientID%>').disabled;
                $get('<%=ddlNamedDrivers.ClientID%>').disabled = onOff;
            }

            if ($get('<%=ddlCoverageComDate.ClientID%>') != null) {
                $get('<%=ddlCoverageComDate.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnSubmit.ClientID%>') != null) {
                $get('<%=btnSubmit.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnNonGGQuotation.ClientID%>') != null) {
                $get('<%=btnNonGGQuotation.ClientID%>').disabled = onOff;
            }

            if ($get('<%=lblLoadMessage.ClientID%>') != null) {
                if (onOff) {
                    $get('<%=lblLoadMessage.ClientID%>').innerHTML = 'Processing... please wait';
                }
            }

        }

        function EndRequest(sender, args) {
            OnOffUpdateProgress(false);
            if ($get('<%=ddlGarageType.ClientID%>') != null) {
                $get('<%=ddlGarageType.ClientID%>').disabled = dGarage;
            }
            if ($get('<%=ddlModification.ClientID%>') != null) {
                $get('<%=ddlModification.ClientID%>').disabled = dModification;
            }
            if ($get('<%=txtAccModAmount.ClientID%>') != null) {
                $get('<%=txtAccModAmount.ClientID%>').disabled = tAccModAmount;
            }
            if ($get('<%=ddlAnyClaim.ClientID%>') != null) {
                $get('<%=ddlAnyClaim.ClientID%>').disabled = dAnyClaim;
            }
            if ($get('<%=ddlNamedDrivers.ClientID%>') != null) {
                $get('<%=ddlNamedDrivers.ClientID%>').disabled = dNamedDrivers;
            }
        }

    </script>

    

</asp:Content>
